using System;
using System.Collections.Generic;
using System.Text;
using Crm.Domain.TestUtil.ObjectMothers;
using NUnit.Framework;
using Crm.Domain;

namespace Ordering.Domain.Tests
{
    [TestFixture]
    public class ShoppingBasketTests
    {
        #region Tests

        [Test]
        public void CanCreateForCustomer()
        {
            Customer customer = CustomerObjectMother.Create();

            ShoppingBasket underTest = new ShoppingBasket(customer);

            Assert.AreEqual(underTest.Customer, customer);
        }

        [Test]
        public void CanAddOrderLine()
        {
            ShoppingBasket underTest = CreateShoppingBasket();

            Assert.Fail("Need OrderLine class");
        }

        #endregion

        # region Tests - Expected Exceptions

        [Test]
        [ExpectedException(typeof(ArgumentNullException))]
        public void CannotCreateForNullCustomer()
        {
            new ShoppingBasket(null);
        }

        # endregion

        # region Support Methods

        private ShoppingBasket CreateShoppingBasket()
        {
            Customer customer = CustomerObjectMother.Create();

            return new ShoppingBasket(customer);
        }

        # endregion
    }
}
